package cn.dust.design.pattern.behavioral.observer;

/**
 * @Author: dust
 * @Date: 2019/11/28 16:04
 */
public class Test {
    public static void main(String[] args) {
        Course course=new Course("语文");
        Teacher teacher=new Teacher("Alpha");
        course.addObserver(teacher);


        Question question=new Question();
        question.setUserName("dust");
        question.setQuestionContent("分为飞机");

        course.produceQuestion(course,question);
    }
}
